package com.zian.domain.po;

import com.baomidou.mybatisplus.annotation.*;


import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.io.Serializable;

import com.zian.enums.IsDeletedEnum;
import com.zian.enums.OrderStatusEnum;
import com.zian.enums.PayStatusEnum;
import com.zian.enums.PayTypeEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 *
 * </p>
 *
 * @author
 * @since 2024-09-08
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("sys_order")
 @ApiModel(  "SysOrder对象")
public class SysOrder implements Serializable {


    private static final long serialVersionUID = 1L;

     @ApiModelProperty(  "订单表主键id")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

     @ApiModelProperty(  "订单号")
    private String orderNo;

     @ApiModelProperty(  "用户主键id")
    private Long userId;

     @ApiModelProperty(  "订单总价")
    private BigDecimal totalPrice;

     @ApiModelProperty(  "支付状态:0.未支付,1.支付成功,-1:支付失败")
    private PayStatusEnum payStatus;

     @ApiModelProperty(  "0.无 1.支付宝支付 2.微信支付")
    private PayTypeEnum payType;

     @ApiModelProperty(  "支付时间")
    private LocalDateTime payTime;

     @ApiModelProperty(  "订单状态:0.待支付 1.已支付 2.配货完成 3:出库成功 4.交易成功 -1.手动关闭 -2.超时关闭 -3.商家关闭")
    private OrderStatusEnum orderStatus;

     @ApiModelProperty(  "订单body ，订单备注")
    private String extraInfo;

     @ApiModelProperty(  "删除标识字段(0-未删除 1-已删除)")
    @TableLogic
    private IsDeletedEnum isDeleted;

     @ApiModelProperty(  "创建时间")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

     @ApiModelProperty(  "最新修改时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;


}
